<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增表单推送信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">渠道名称：</label>
                <div class="col-sm-8">
                    <input name="channelName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">渠道类型：</label>
                <div class="col-sm-8">
                    <input name="type" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">描述：</label>
                <div class="col-sm-8">
                    <input name="descInfo" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开始日期：</label>
                <div class="col-sm-8">
                    <input name="startDate" id="startDate" class="form-control" type="text" required autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开始时间：</label>
                <div class="col-sm-8">
                    <input name="startTime" id="startTime" class="form-control" type="text" required autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">结束时间：</label>
                <div class="col-sm-8">
                    <input name="endTime" id="endTime" class="form-control" type="text" required autocomplete="off">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "form/info"
        $("#form-info-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-info-add').serialize());
            }
        }

        layui.use('laydate', function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: '#startTime',
                type: 'time'
            });

            laydate.render({
                elem: '#endTime',
                type: 'time'
            });

            laydate.render({
                elem: '#startDate',
                type: 'date'
            });


        });
    </script>
</body>
</html>